# 日志打印器
def logger(func):
    def wrapper(*args):
        print(f"before: {func.__name__}")
        func(*args)
        print(f"after: {func.__name__}")

    return wrapper


@logger
def MyPrint():
    print("test")


decoratorFunc = logger(MyPrint)
decoratorFunc()

# MyPrint()

# 输入一定是一个函数, 输出一般是装饰后的callable
